//
//  MeCommonCell.m
//  youthNote
//
//  Created by huangrensheng on 16/7/18.
//  Copyright © 2016年 laber. All rights reserved.
//

#import "MeCommonCell.h"

@implementation MeCommonCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self initChildViews];
        [self makeConstraints];
    }
    return self;
}

- (void)initChildViews{
    self.commonLabel = [[UILabel alloc] initWithFont:[UIFont systemFontOfSize:FONT_LITTLE_MIDDLE] TextColor:BLACK_COLOR Text:@""];
    [self.contentView addSubview:self.commonLabel];
    
    self.rightArrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"right_arrow"]];
    [self.contentView addSubview:self.rightArrow];
}

- (void)makeConstraints{
    __weak typeof(self) WeakSelf = self;
    [self.rightArrow mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(WeakSelf.contentView.mas_centerY);
        make.trailing.equalTo(WeakSelf.contentView.mas_trailing).equalTo(inset(-8));
        make.width.equalTo(inset(10));
    }];
    
    [self.commonLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.equalTo(WeakSelf.contentView.mas_leading).equalTo(inset(8));
        make.trailing.equalTo(WeakSelf.rightArrow.mas_leading).equalTo(inset(-8));
        make.centerY.equalTo(WeakSelf.contentView.mas_centerY);
    }];
}

@end
